/************************************************************
 *  * TKTab CONFIDENTIAL
 * __________________
 * Copyright (C) 2013-2014 CWSwift Technologies. All rights reserved.
 *
 * NOTICE: All information contained herein is, and remains
 * the property of CWSwift Technologies.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from TKTab Technologies.
 * knight lu 349919133
 */
#import "ButtonItemsExampleController.h"

#import "RKTabView.h"

@interface ButtonItemsExampleController ()
@property (nonatomic, strong) IBOutlet RKTabView* tabViewSocial;
@end

@implementation ButtonItemsExampleController

- (void)viewDidLoad
{
    [super viewDidLoad];
    
    self.title = @"按钮样式-[创新源于一种感觉]";
    
    RKTabItem *tabItemGooglePlus = [RKTabItem createButtonItemWithImage:[UIImage imageNamed:@"googleplus"] target:self selector:@selector(buttonTabPressed:)];
    RKTabItem *facebook = [RKTabItem createButtonItemWithImage:[UIImage imageNamed:@"facebook"] target:self selector:@selector(buttonTabPressed:)];
    RKTabItem *flickr = [RKTabItem createButtonItemWithImage:[UIImage imageNamed:@"twitter"] target:self selector:@selector(buttonTabPressed:)];
    RKTabItem *twitter = [RKTabItem createButtonItemWithImage:[UIImage imageNamed:@"flickr"] target:self selector:@selector(buttonTabPressed:)];
    
    self.tabViewSocial.horizontalInsets = HorizontalEdgeInsetsMake(70, 70);
    self.tabViewSocial.drawSeparators = YES;
    [self.tabViewSocial setTabItems:@[tabItemGooglePlus, facebook, flickr, twitter]];
}

#pragma mark - Button handler

- (void)buttonTabPressed:(id)sender {
    NSLog(@"Button %@ has been pressed in tabView", sender);
}

@end
